Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: replace license #1209

@xenoterracide

Description

@xenoterracide

I'm relicensing my software (only I have contributed) but it would appear that reuse only appends license. There is no replace. This means I'm going to have to go through and remove the existing licenses first. I would have thought that with reuse annotate

  --no-replace                    Do not replace the first header in the file;
                                  just add a new one.

would have prevented replacment, and without it the header would simply be replaced

this is the change I got running

reuse annotate --license 'AGPL-3.0-or-later WITH Classpath-exception-2.0' --copyright 'Caleb Cushing' --copyright-prefix spdx-string-symbol --merge-copyrights module/git/src/main/java/com/xenoterracide/gradle/git/*
-// SPDX-FileCopyrightText: Copyright © 2024 Caleb Cushing
+// SPDX-FileCopyrightText: Copyright © 2024 - 2025 Caleb Cushing
 //
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH Classpath-exception-2.0
 // SPDX-License-Identifier: Apache-2.0

an option like

--replace-license

would be nice

reuse, version 5.0.2

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions