TheThingsArchive / packet_forwarder

Packet forwarder for Linux based gateways
MIT License
84 stars 92 forks source link

New master branch will break ttn-zh/ic880a-gateway #4

Closed ralphtheninja closed 7 years ago

ralphtheninja commented 7 years ago

Not sure if this is the correct repo to report to or if I should report in ttn-zh/ic880a-gateway.

Anyway, I noticed that the master branch changed recently and that the previous functionality now is inside the legacy branch.

However, the install.sh script in ttn-zh/ic880a-gateway installs this repository in the following way (from https://github.com/ttn-zh/ic880a-gateway/blob/1259594d1675c4ad7b88ec8cdd6f742a6779da0a/install.sh#L140-L148)

# Build packet forwarder
if [ ! -d packet_forwarder ]; then
    git clone https://github.com/TheThingsNetwork/packet_forwarder.git
    pushd packet_forwarder
else
    pushd packet_forwarder
    git pull
    git reset --hard
fi

Since the previous master branch now resides in the legacy branch, this will work for new installations since git clone will default to that branch. However, if you already have installed the master branch, prior to master being rewritten the else case will run which will reset the master branch to the new origin/master and I believe this will break.

cc @gonzalocasas

johanstokking commented 7 years ago

Thanks for reporting. Please file the issue in https://github.com/ttn-zh/ic880a-gateway/issues

The install script should clone from legacy, so git clone -b legacy .... When the folder exists, it should checkout the legacy branch.

I'll file a PR because it's me who's causing this. I also filed a similar PR here: https://github.com/netceteragroup/rpi-ttn-gateway/pull/13

ralphtheninja commented 7 years ago

Thanks for quick response! This is why I don't want to pick commercial solutions like Actility or Loriot ;)