ava1ar / customizepkg

A tool for Arch Linux package manager pacman to modify PKGBUILD automatically
GNU General Public License v3.0
49 stars 14 forks source link

Patch does not work for packages that don't immediately cd into the source directory #13

Closed nogweii closed 9 years ago

nogweii commented 9 years ago

For example, the package kdeplasma-applets-menubar-archway-bzr:

# ...
build() {
  [ -f build ] && rm build
  [ -d build ] || mkdir build
  cd build
  cmake ../$pkgname \
# ...

After running customizepkg:

build() {
  [ -f build ] && rm build
patch -Np1 -i remove_right_icon.diff
  [ -d build ] || mkdir build
  cd build

And then patch breaks, because the diff expects to be in build/, where the source code is.

nogweii commented 9 years ago

I have a possible fix for this in my branch, evaryont@9fb3ee5 but it's pretty dirty.

ava1ar commented 9 years ago

I believe for such PKGBUILD replace can be used to insert the patch string to the correct location, so I think we can live with this patch command limitation.

nogweii commented 9 years ago

Or, for anyone else that might stumble upon this, they could also use the newly added addline action as well.