mirror of
https://github.com/fosskers/cargo-aur.git
synced 2026-03-08 23:03:13 -05:00
[PR #31] feat: support backup packaging function
#33
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosskers/cargo-aur/pull/31
Author: @sjugge
Created: 9/3/2024
Status: 🔄 Open
Base:
master← Head:pkg-meta-backup📝 Commits (1)
ee732cdfeat: supportbackuppackaging function📊 Changes
3 files changed (+35 additions, -1 deletions)
View changed files
📝
README.md(+18 -1)📝
src/lib.rs(+2 -0)📝
src/main.rs(+15 -0)📄 Description
This PR adds support for the
backuppackaging function.rationale
Additional files can be included, which may be user-modified configuration files. As-is, a package build using
cargo-aurwill overwrite any user-made changes to files that are contained in the package.With this feature, files can be defined which may be user-modified. If a file is user-modified, the packaged file will be added as .pacnew and not overwrite any changes made by the user.
If a package is removed, and any packaged file is user-modified, a .pacsave file will be retained.
implementation
I extended the existing
[package.metadata.aur]approach as to not get in the way of Cargo's default[package]and took a similar approach as to how thepackage()section is built up. This does duplicate that logic somewhat, but I suspect there may be other package functions that could piggy back of this approach in the future should there be a need for them.I added relevant information in terms of usage in the README.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.