You are not logged in.

#1 2017-03-27 09:00:31

HowP
Member
Registered: 2017-03-27
Posts: 5

[Solved] - Help with solving depedencies via PKGBUILD

Hello,

first I have to say that I have own repository of my own packages and kernels.  In my repository are applications that are dependant on specific kernel version for example 3.12-18, lets call this app ledblinker-v1.0 and kernel linux-my-v3.12-18.

On system is installed the ledblinker with linux-my, everything is working.

Now I have created new kernel named for example linux-newkernel-v4.9-10.

When upgrading the system I need to get the PKGBUILD of package linux-newkernel-v4.9-10 to remove previous kernel package (linux-my) and install package linux-newkernel. Yes this can be accomplished by using conflicts array BUT if it removes the previous kernel (linux-my) the depedency of ledblinker is not satisfied and the pacman wont install new kernel (linux-newkernel) at all. So I thought I will use replaces array with provides array BUT when using these two arrays the old kernel package (linux-my) is not removed but depedency is satisfied so new kernel (linux-newkernel) is installed.

Can you help me how to achieve the depedency satisfaction and removing old kernel? The only one solution that i think of was modify post_install and post_upgrade to remove old kernel but it seems to be very unclean solution.

I have like 4 more kernels in my repository (and over 40 kernel depedency applications) which I am replacing by one new kernel and want to be compatible with all older packages.

Firstly I thought that the replaces array will solve this but

Thank you for ideas. smile

 Starting full system upgrade...
:: Replace linux-my with myrepo/linux-newkernel? [Y/n] 
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: ledblinker: requires linux-my>=3.8.13-45
:: crypting-accelerator: requires linux-my>=3.8.13-45

In PKGBUILD of linux-newkernel is:

 45   provides=('linux-my' 'linux-testmy')
 46   replaces=('linux-my' 'linux-testmy')
 47   #conflicts=('linux-my' 'linux-testmy')
 48   install=${pkgname}.install

Last edited by HowP (2017-03-29 09:43:59)

Offline

#2 2017-03-27 09:16:15

mis
Member
Registered: 2016-03-16
Posts: 234

Re: [Solved] - Help with solving depedencies via PKGBUILD

HowP wrote:

In PKGBUILD of linux-newkernel is:

 45   provides=('linux-my 'linux-testmy')

There is a typo in the provides array. Should be

provides=('linux-my' 'linux-testmy')

Offline

#3 2017-03-27 09:22:52

HowP
Member
Registered: 2017-03-27
Posts: 5

Re: [Solved] - Help with solving depedencies via PKGBUILD

Yea the ' is present in original PKGBUILD I just removed it when changing package names, sorry

 provides=('linux-my' 'linux-testmy')
 replaces=('linux-my' 'linux-testmy')
 #conflicts=('linux-my' 'linux-testmy')
 install=${pkgname}.install

Main post edited.

Last edited by HowP (2017-03-27 09:23:59)

Offline

#4 2017-03-27 09:35:06

mis
Member
Registered: 2016-03-16
Posts: 234

Re: [Solved] - Help with solving depedencies via PKGBUILD

HowP wrote:
:: ledblinker: requires linux-my>=3.8.13-45
:: crypting-accelerator: requires linux-my>=3.8.13-45

I'm not sure, but possibly the dependencies on a specific version are the problem...

Welcome to the forums. smile

Offline

#5 2017-03-27 10:37:07

HowP
Member
Registered: 2017-03-27
Posts: 5

Re: [Solved] - Help with solving depedencies via PKGBUILD

I just tested it, and yes the problem is in the version. When I remove version, it is working as intended. Thank you.

Now I need to create some workaround,  to get it working. Maybe adding the version to the provides array will fix this, I will try this. (Not working in provides array can not be chars < and >) sad

Thanks smile I am using arch with openbox for 5 years now smile I can not imagine going back to different Linux Branch. big_smile

Last edited by HowP (2017-03-27 10:39:12)

Offline

#6 2017-03-27 10:46:23

HowP
Member
Registered: 2017-03-27
Posts: 5

Re: [Solved] - Help with solving depedencies via PKGBUILD

It is "fixed" In all my packages are dependencies only on one specific version of linux-my package so I changed the provides array to the one specific version and now it is working.

provides=('linux-my==3.8.13-45' 'linux-my' 'linux-testmy')
 replaces=('linux-my' 'linux-testmy')
 #conflicts=('linux-my' 'linux-testmy')
 install=${pkgname}.install

I do not see another solution.

Thank you for guiding me right way smile

Also I would love to find solution to problem number two.

I have .install script (it is correctly linked in PKGBUILD) in package ledblinker with following content

pre_install() {
  mv "/home/jakub/.xinitrc" "/home/jakub/.orig_xinitrc"
}

post_install() {
  /usr/bin/can-init.sh
  sleep 1
  uEnvModder -o delete -e SomeKernelEntry -k SomeKernelKeyword
}

post_upgrade() {
	uEnvModder -o delete -e SomeKernelEntry -k SomeKernelKeyword

}

post_remove() {
  mv "/home/jakub/.orig_xinitrc" "/home/jakub/.xinitrc"
} .

When installing ledblinker the post_install is not called but when upgrading the post_upgrade is called. Maybe the problem is in calling sleep in post_install? but I can not see reason why.

Thanks

Last edited by HowP (2017-03-27 10:51:08)

Offline

#7 2017-03-29 09:43:38

HowP
Member
Registered: 2017-03-27
Posts: 5

Re: [Solved] - Help with solving depedencies via PKGBUILD

Marking thread as Solved, in post and pre actions cannot be sleep command.

Offline

Board footer

Powered by FluxBB