#1120950 'dht upgrade foo' should merge Hackage's x-revision of foo.cabal

Package:
cabal-install
Source:
cabal-install
Description:
command-line interface for Cabal and Hackage
Submitter:
Nicholas D Steeves
Date:
2025-11-18 20:23:01 UTC
Severity:
normal
#1120950#5
Date:
2025-11-16 02:41:12 UTC
From:
To:
package-plan/README.txt says one should use "cabal unpack foo" to get
the source that is used to create the package-plan's copy of quilt
patches for foo.  Unfortunately, these patches cannot be applied to
the Debian upstream source, because "cabal unpack foo" corrupts the
upstream source by adding MSDOS/Windows carriage returns (^M).  I
encountered this issue when I tried to apply the package-plan
hledger-ui quilt series to haskell-hledger-ui.  The patch does not
apply.

Best,
Nicholas

#1120950#12
Date:
2025-11-17 22:18:10 UTC
From:
To:
reassign 1120778 cabal-install
quit

I think what `cabal unpack` is doing is downloading https://hackage.haskell.org/package/hledger-ui-1.50.2/hledger-ui-1.50.2.tar.gz and then overwriting hledger-ui.cabal from the tarball (which has proper line endings) with https://hackage.haskell.org/package/hledger-ui-1.50.2/hledger-ui.cabal (which does not).

#1120950#19
Date:
2025-11-18 18:36:01 UTC
From:
To:
forwarded 1120778 https://github.com/haskell/hackage-server/issues/316
clone 1120778 -1
retitle -1 'dht upgrade foo' should merge Hackage's x-revision of foo.cabal
thanks

Scott Talbert, thank you for finding this!  I hope our Debian copy of
this bug will be enough to encourage them to deploy the sternenseemann's
fix.

Clint Adams <clint@debian.org> writes:

If you manually compare the hledger-interest.cabal generated by 'cabal
unpack' (downloads cabal file from Hackage and applies it on top) to the
hledger-interest.cabal of 'dht upgrade' (the cabal file in the release
tarball), the latter doesn't represent the state of hledger-interest on
Hackage.  In other words, the package-plan is consistent with Hackage,
but the Debian package (DHG_packages/p/foo) is not consistent with the
package-plan, nor with Hackage.  The addition of "x-revision" in the
updated cabal file header makes this easier to identify.

The work per-package-update that is currently required is thus: the
person who runs 'dht upgrade' reads Hackage's foo.cabal with their eyes
and brain and then manually creates a quilt series that replicates the
logical delta without importing Hackage's current CR/LF issue into the
Debian package at DHG_packages/p/foo.  Do I need to add more detail to
this newly cloned bug ('dht upgrade foo' should merge Hackage's
x-revision of foo.cabal)?

Cheers,
Nicholas