Skip to content
  • Eli Schwartz's avatar
    makepkg: fix erroneous $BUILDDIR when $startdir is not an absolute path · 79320234
    Eli Schwartz authored and Allan McRae's avatar Allan McRae committed
    
    
    When comparing the $BUILDDIR to the $startdir, we used string equality
    instead of testing whether they are the same location, and ended up
    appending $pkgbase even though there's no reason to use it here.
    
    In some cases, this could result in makepkg erroring when trying to
    create $srcdir/$pkgdir, if a file with the same name as the $pkgbase
    exists. This is expected behavior if a file "src" or "pkg" exists, but
    decidedly less so for $pkgbase.
    
    This could be fixed either by setting $startdir to an absolute path, or
    by ensuring the test checks this directly; I've chosen to do both, since
    the test should really be correctly checking the thing it actually cares
    about, but since we ensure absolute paths are used everywhere else, this
    might bite us elsewhere someday. It's also more consistent.
    
    Fixes FS#58865
    
    Signed-off-by: default avatarEli Schwartz <eschwartz@archlinux.org>
    Signed-off-by: default avatarAllan McRae <allan@archlinux.org>
    79320234