[pve-devel] [PATCH pve-apiclient] add make target to copy and include files from pve-common - update Exception.pm
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Jun 14 11:41:03 CEST 2018
On 6/14/18 11:24 AM, René Jochum wrote:
> On 2018-06-14 11:15, Wolfgang Bumiller wrote:
>> On Thu, Jun 14, 2018 at 10:03:54AM +0200, Dietmar Maurer wrote:
>>> Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
>>> ---
>>> Makefile | 7 +++++
>>> PVE/APIClient/Exception.pm | 66 +++++++++++++++++++++++++++++++++++++++-------
>>> 2 files changed, 64 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/Makefile b/Makefile
>>> index ad1efda..ec67f2d 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -9,6 +9,9 @@ DESTDIR=
>>> PERL5DIR=${DESTDIR}/usr/share/perl5
>>> DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
>>>
>>> +PVE_COMMON_FILES= \
>>> + Exception.pm
>>> +
>>> all: ${DEB}
>>>
>>> .PHONY: deb
>>> @@ -27,6 +30,10 @@ install:
>>> install -m 0755 examples/example2.pl ${DOCDIR}/examples
>>> install -m 0755 examples/perftest1.pl ${DOCDIR}/examples
>>>
>>> +update-pve-common:
>>> + for i in ${PVE_COMMON_FILES}; do cp ../pve-common/src/PVE/$$i PVE/APIClient/; done
>> *ahem*...
>> can't we use /usr/share/perl5/PVE or wget from git.proxmox.com or a
>> temporary shallow git clone...?
> Why? Makes stuff complicated in my opinion, you don't have "pve-common"
> in the parent directory of pve-apiclient?
>
I agree with Wolfgang, this look rather like a hack...
Why should I have it there? There should not be any assumptions
about directory structures outside the repository boundaries,
besides - obvious - system wide ones...
Why not actually add a submodule and ship the wanted files directly
from there? The update_modules target does the rest, as in other
repos. Much less complicated for people, IMO, as they do not need
to setup their directory tree by trial and error if they want to
try things out...
More information about the pve-devel
mailing list