pacstall / pacup

Help maintainers update pacscripts (next-gen Perl rewrite)
GNU General Public License v3.0
5 stars 2 forks source link

FR: retain _remoterepo and _remotebranch #12

Closed Zahrun closed 4 months ago

Zahrun commented 4 months ago

Describe the bug

Upgrading a package with pacup will remove _remoterepo and _remotebranch from pacstall metadata. For example in /var/lib/pacstall/metadata/obs-backgroundremoval-deb

To reproduce

  1. pacstall -I obs-backgroundremoval-deb
  2. cat /var/lib/pacstall/metadata/obs-backgroundremoval-deb # has _remoterepo
  3. pacup -s obs-backgroundremoval-deb/obs-backgroundremoval-deb.pacscript -c 1.1.13
  4. eval $(git push 2>&1 | grep " --set") -f
  5. cat /var/lib/pacstall/metadata/obs-backgroundremoval-deb # doesn’t have _remoterepo

Expected behavior

Upgrading a package with pacup will retain _remoterepo and _remotebranch in pacstall metadata. Goal: if someone else upgrades the package later in the repo, so that we can get the update with pacstall -Up

Screenshots

 grep -rL remoterepo /var/lib/pacstall/metadata
/var/lib/pacstall/metadata/teams-for-linux-deb
/var/lib/pacstall/metadata/obs-backgroundremoval-deb
/var/lib/pacstall/metadata/ferdium-deb
vigress8 commented 4 months ago

After giving this one some thought, I've concluded that it's out of scope for pacup to fix what is fundamentally a Pacstall issue. Remote metadata is not preserved when installing from a local pacscript, and to work around this pacup would need to manually store it and then add back in, which requires sudo privileges and is generally a headache. I suggest opening this issue in the pacstall repo